package com.ruoyi.servicesInfo.service.impl;

import java.util.List;

import com.ruoyi.bannerInfo.domain.BannerInfo;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.servicesInfo.mapper.ServicesInfoMapper;
import com.ruoyi.servicesInfo.domain.ServicesInfo;
import com.ruoyi.servicesInfo.service.IServicesInfoService;

/**
 * 服务功能Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-15
 */
@Service
public class ServicesInfoServiceImpl implements IServicesInfoService 
{
    @Autowired
    private ServicesInfoMapper servicesInfoMapper;

    /**
     * 查询服务功能
     * 
     * @param serviceId 服务功能主键
     * @return 服务功能
     */
    @Override
    public ServicesInfo selectServicesInfoByServiceId(Long serviceId)
    {
        return servicesInfoMapper.selectServicesInfoByServiceId(serviceId);
    }

    /**
     * 查询服务功能列表
     *
     * @param servicesInfo 服务功能
     * @return 服务功能集合
     */
    @Override
    public List<ServicesInfo> selectServicesInfoListByTypeAndStatus(ServicesInfo servicesInfo) {
        return servicesInfoMapper.selectServicesInfoListByTypeAndStatus(servicesInfo);
    }

    /**
     * 查询服务功能列表
     * 
     * @param servicesInfo 服务功能
     * @return 服务功能
     */
    @Override
    public List<ServicesInfo> selectServicesInfoList(ServicesInfo servicesInfo)
    {
        return servicesInfoMapper.selectServicesInfoList(servicesInfo);
    }

    /**
     * 新增服务功能
     * 
     * @param servicesInfo 服务功能
     * @return 结果
     */
    @Override
    public int insertServicesInfo(ServicesInfo servicesInfo)
    {
        servicesInfo.setCreateTime(DateUtils.getNowDate());
        return servicesInfoMapper.insertServicesInfo(servicesInfo);
    }

    /**
     * 修改服务功能
     * 
     * @param servicesInfo 服务功能
     * @return 结果
     */
    @Override
    public int updateServicesInfo(ServicesInfo servicesInfo)
    {
        servicesInfo.setUpdateTime(DateUtils.getNowDate());
        return servicesInfoMapper.updateServicesInfo(servicesInfo);
    }

    /**
     * 批量删除服务功能
     * 
     * @param serviceIds 需要删除的服务功能主键
     * @return 结果
     */
    @Override
    public int deleteServicesInfoByServiceIds(Long[] serviceIds)
    {
        return servicesInfoMapper.deleteServicesInfoByServiceIds(serviceIds);
    }

    /**
     * 删除服务功能信息
     * 
     * @param serviceId 服务功能主键
     * @return 结果
     */
    @Override
    public int deleteServicesInfoByServiceId(Long serviceId)
    {
        return servicesInfoMapper.deleteServicesInfoByServiceId(serviceId);
    }
}
